/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.primecodegen.core;

/**
 *
 * @author mohammad
 */
public class NewClass {

    public static void main(String[] args) {
        String x = "moh?hammad riy?ad aw?wad";
        String newX = "";

        char[] toCharArray = x.toCharArray();
        int v = 1;
        for (int i = 0; i < toCharArray.length; i++) {
            char c = toCharArray[i];
            String a = c + "";
            if (a.equals("?")) {
                a = v + "";
                v++;
            }
            newX += a;
    
        }
                System.out.println(x);
            System.out.println(newX);
    }
}
